import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import './assets/css/global.css'
import './assets/fonts/iconfont.css'
// import moment from 'moment'
import VueQuillEditor from  'vue-quill-editor'

import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

Vue.use(VueQuillEditor);

import MainBox from './pubcom/MainBox.vue'
Vue.component('MainBox',MainBox);

import TableTree from 'vue-table-with-tree-grid'
Vue.component('table-tree', TableTree);

import axios from 'axios'
axios.defaults.baseURL='http://127.0.0.1:8888/api/private/v1/'
//token 请求拦截
axios.interceptors.request.use(config=>{
  config.headers.Authorization =window.sessionStorage.getItem('token');
  return config;
})
//把axios放在Vue的构造函数中，所有的Vue(组件)都可以使用($http是自己定义的，切记)
Vue.prototype.$http=axios

// Vue.prototype.$moment=moment

// Vue.filter('dateFormat', [definition])

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')


